import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '货品编号',
    align:"center",
    dataIndex: 'goodsNo',
    resizable:true
  },
  {
    title: '货品名称',
    align:"center",
    dataIndex: 'goodsName',
    resizable: true
  },
  {
    title: '货品简称',
    align:"center",
    dataIndex: 'shortName',
    resizable:true
  },
  {
    title: '规格数',
    align:"center",
    dataIndex: 'specCount',
    resizable:true
  },
  {
    title: '备注',
    align:"center",
    dataIndex: 'remark',
    resizable:true
  },
  {
    title: '创建时间',
    align:"center",
    dataIndex: 'gmtCreate',
    resizable:true
  },
  {
    title: '修改时间',
    align:"center",
    dataIndex: 'gmtUpdate',
    resizable:true
  },
];

//子表列表数据
export const goodsInfoSpecColumns: BasicColumn[] = [
  {
    title: '货品编号',
    align:"center",
    dataIndex: 'goodsNo',
    resizable:true
  },
  {
    title: '单品唯一键',
    align:"center",
    dataIndex: 'specId',
    resizable:true
  },
  {
    title: '商家编码',
    align:"center",
    dataIndex: 'specNo',
    resizable:true
  },
  {
    title: '主条码',
    align:"center",
    dataIndex: 'barcode',
    resizable:true
  },
  {
    title: '规格名称',
    align:"center",
    dataIndex: 'specName',
    resizable:true
  },
  {
    title: '最后修改时间',
    align:"center",
    dataIndex: 'specModified',
    resizable:true
  },
  {
    title: '创建时间, 时间格式 YYYY-MM-DD HH:MM:SS',
    align:"center",
    dataIndex: 'specCreated',
    resizable:true
  },
  {
    title: '图片URL',
    align:"center",
    dataIndex: 'imgUrl',
    customRender:render.renderImage,
    resizable:true
  },
];

// 高级查询数据
export const superQuerySchema = {
  goodsNo: {title: '货品编号',order: 0,view: 'text', type: 'string',},
  goodsName: {title: '货品名称',order: 1,view: 'text', type: 'string',},
  shortName: {title: '货品简称',order: 2,view: 'text', type: 'string',},
  specCount: {title: '规格数',order: 3,view: 'number', type: 'number',},
  remark: {title: '备注',order: 4,view: 'text', type: 'string',},
  gmtCreate: {title: '创建时间',order: 5,view: 'datetime', type: 'string',},
  gmtUpdate: {title: '修改时间',order: 6,view: 'datetime', type: 'string',},
};
